<% toc_level = (level, maxLevel, currentLevel=1) => %>
    <ol>
    <% for entry in level: %>
        <li>
            <a href="<%= @baseUrl %><%- entry.slug %>.html#<%= entry.anchor %>"><%= entry.title %></a>
            <% if entry.childs and currentLevel < maxLevel: %>
                <%= toc_level(entry.childs, maxLevel, currentLevel + 1) %>
            <% end %>
        </li>
    <% end %>
</ol>
<% end %>
	<div id="sidebar" style="overflow-y:auto">
	    <form action="<%= @baseUrl %>search.html"><input id="search" type="text" placeholder="Search" name="q" /></form>
	    <nav id="toc">
	        <%= toc_level(@manifest.tableOfContent, @manifest.maxTocLevel) %>
	    </nav>
	    <% if @manifest.links: %>
	    <nav id="links">
	        <ul>
	            <% for link in @manifest.links: %>
	            <li><a href="<%= link[1] %>"><%= link[0] %></a></li>
	            <% end %>
	        </ul>
	    </nav>
	    <% end %>
		<div id="copyright">
			Powered by <a href="http://github.com/maximebf/beautiful-docs">beautiful-docs</a> -
	        <a href="#top">Back to top</a>
		</div>
	</div>
